Commands for CD-ROM devices PLAY AUDIO TRACK RELATIVE(12) command READ HEADER command
SCSI-2

14.2.8 READ CD-ROM CAPACITY command

The READ CD-ROM CAPACITY command (see table 246) provides a means for the initiator to request information regarding the capacity of the logical unit.

Table 246 - READ CD-ROM CAPACITY command

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |                           Operation code (25h)                        |
|-----------------------------------------------------------------------------|
| 1   | Logical unit number      |             Reserved              | RelAdr |
|-----------------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|---------                                                                 ---|
| 3   |                                                                       |
|---------                        Logical block address                    ---|
| 4   |                                                                       |
|---------                                                                 ---|
| 5   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 8   |                           Reserved                           |  PMI   |
|-----------------------------------------------------------------------------|
| 9   |                           Control                                     |
===============================================================================
( This command has the same operation code (25h) as the READ CAPACITY command (see 92.7). The general function is the same but the exact definitions of the returned logical block address is modified to allow returning a possibly inexact value (but one with a known error bound) based on CD-ROM table of contents data. For many CD-ROM devices, this implementation allows a quicker response. )

A partial medium indicator (PMI) bit of zero indicates that the information returned in the READ CD-ROM CAPACITY data shall be the logical block address and block length (in bytes) of the last valid logical block of the logical unit for seek operations. The logical block address returned shall be greater than or equal to the last readable or playable block. If greater, this address may be in a transition area beyond the last valid logical block for read or audio play operations. The value returned shall not be not be more than 75 sectors (MSF units) greater than the logical block address of the last readable or playable block. (This value arises because the CD-ROM table of contents lead-out track location has a +/- 75 sector tolerance when the lead-out track is encoded as an audio track.) The logical block address in the command descriptor block shall be set to zero for this option.

A PMI bit of one indicates that the information returned shall be the logical block address and block length (in bytes) of the last logical block address after which a substantial delay in data transfer will be encountered. This logical block address shall be greater than or equal to the logical block address specified in the command descriptor block. On CD-ROM media, this is interpreted as being the last readable or playable logical block of the information area containing or immediately following the specified logical block address.

( This option may take several seconds to complete on CD-ROM media. )

See 9.1.10 for a description of the relative address bit (RelAdr).

Eight bytes of READ CD-ROM CAPACITY data (see table 247) shall be sent during the DATA IN phase of the command.

Table 247 - READ CAPACITY data format

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   | (MSB)                                                                 |
|- - -----                        Logical block address                    ---|
| 3   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|- - -----                        Block length                             ---|
| 7   |                                                                 (LSB) |
===============================================================================